from PyQt5.QtWidgets import *
from PyQt5 import uic
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import sys
from HTTP import Ui_MainWindow
'''方法一'''
# class stats:
#
#     def __init__(self):
#         self.ui = uic.loadUi("HTTP.ui")
#         self.ui.show()
#
# if __name__ == '__main__':
#
#     app = QApplication(sys.argv)
#     status = stats()
#     sys.exit(app.exec_())
'''方法二'''

class Stats(QMainWindow):

    def __init__(self):
        super(Stats, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.ui.retranslateUi(self)
        self.show()

if __name__ == '__main__':

    app = QApplication(sys.argv)
    app.setWindowIcon(QIcon('../controls/python.png'))
    status = Stats()
    sys.exit(app.exec_())